
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>9、zset类型的操作 · 王坤个人博客</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="wk">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-donate/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism-duotone-dark.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    
    <link rel="prev" href="8、redis集群搭建.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="https://my.oschina.net/kunBlog" target="_blank" class="custom-link">我的博客地址</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../cassandra/">
            
                <a href="../cassandra/">
            
                    
                    Cassandra
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../cassandra/1、cassandra的安装.html">
            
                <a href="../cassandra/1、cassandra的安装.html">
            
                    
                    1、cassandra的安装
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../docker/">
            
                <a href="../docker/">
            
                    
                    Docker
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../docker/1、docker与虚拟机的不同.html">
            
                <a href="../docker/1、docker与虚拟机的不同.html">
            
                    
                    1、docker与虚拟机的不同
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../docker/2、镜像、容器、仓库.html">
            
                <a href="../docker/2、镜像、容器、仓库.html">
            
                    
                    2、镜像、容器、仓库
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../docker/3、在centos中安装.html">
            
                <a href="../docker/3、在centos中安装.html">
            
                    
                    3、在centos中安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../docker/4、配置私有镜像仓库.html">
            
                <a href="../docker/4、配置私有镜像仓库.html">
            
                    
                    4、配置私有镜像仓库
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../docker/5、docker的命令.html">
            
                <a href="../docker/5、docker的命令.html">
            
                    
                    5、docker的命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="../docker/6、镜像的原理.html">
            
                <a href="../docker/6、镜像的原理.html">
            
                    
                    6、镜像的原理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.7" data-path="../docker/7、创建一个镜像.html">
            
                <a href="../docker/7、创建一个镜像.html">
            
                    
                    7、创建一个镜像
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.8" data-path="../docker/8、容器数据卷-持久化文件或目录.html">
            
                <a href="../docker/8、容器数据卷-持久化文件或目录.html">
            
                    
                    8、容器数据卷(持久化文件或目录)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.9" data-path="../docker/9、dockerfile.html">
            
                <a href="../docker/9、dockerfile.html">
            
                    
                    9、dockerfile
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.10" data-path="../docker/10、创建自己的tomcat镜像.html">
            
                <a href="../docker/10、创建自己的tomcat镜像.html">
            
                    
                    10、创建自己的tomcat镜像
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.11" data-path="../docker/11、使用docker安装mysql和redis.html">
            
                <a href="../docker/11、使用docker安装mysql和redis.html">
            
                    
                    11、使用docker安装mysql和redis
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.12" data-path="../docker/12、把本地镜像发布到阿里云.html">
            
                <a href="../docker/12、把本地镜像发布到阿里云.html">
            
                    
                    12、把本地镜像发布到阿里云
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../golang/">
            
                <a href="../golang/">
            
                    
                    Golang
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" >
            
                <span>
            
                    
                    Examples
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1.1" data-path="../golang/examples/1、生成随机数.html">
            
                <a href="../golang/examples/1、生成随机数.html">
            
                    
                    1、生成随机数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.2" data-path="../golang/examples/2、数组冒泡排序.html">
            
                <a href="../golang/examples/2、数组冒泡排序.html">
            
                    
                    2、数组冒泡排序
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.3" data-path="../golang/examples/3、二分查找.html">
            
                <a href="../golang/examples/3、二分查找.html">
            
                    
                    3、二分查找
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.4" data-path="../golang/examples/4、工厂模式.html">
            
                <a href="../golang/examples/4、工厂模式.html">
            
                    
                    4、工厂模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.5" data-path="../golang/examples/5、对切片排序.html">
            
                <a href="../golang/examples/5、对切片排序.html">
            
                    
                    5、对切片排序
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.2" >
            
                <span>
            
                    
                    go的命令行
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.2.1" data-path="../golang/go的命令行/1、go的get命令.html">
            
                <a href="../golang/go的命令行/1、go的get命令.html">
            
                    
                    1、go get 命令
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.3" >
            
                <span>
            
                    
                    json序列化
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.3.1" data-path="../golang/json序列化/1、json序列化.html">
            
                <a href="../golang/json序列化/1、json序列化.html">
            
                    
                    1、json序列化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.2" data-path="../golang/json序列化/2、json反序列化.html">
            
                <a href="../golang/json序列化/2、json反序列化.html">
            
                    
                    2、json反序列化
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.4" >
            
                <span>
            
                    
                    包管理工具
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.4.1" data-path="../golang/包管理工具/dep包管理工具.html">
            
                <a href="../golang/包管理工具/dep包管理工具.html">
            
                    
                    dep包管理工具
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.5" >
            
                <span>
            
                    
                    协程和管道
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.5.1" data-path="../golang/协程和管道/1、goroutine基础.html">
            
                <a href="../golang/协程和管道/1、goroutine基础.html">
            
                    
                    1、goroutine基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.2" data-path="../golang/协程和管道/2、goroutine的调度模型.html">
            
                <a href="../golang/协程和管道/2、goroutine的调度模型.html">
            
                    
                    2、goroutine的调度模型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.3" data-path="../golang/协程和管道/3、全局锁和管道.html">
            
                <a href="../golang/协程和管道/3、全局锁和管道.html">
            
                    
                    3、全局锁和管道
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.4" data-path="../golang/协程和管道/4、管道.html">
            
                <a href="../golang/协程和管道/4、管道.html">
            
                    
                    4、管道
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.5" data-path="../golang/协程和管道/5、管道的注意点.html">
            
                <a href="../golang/协程和管道/5、管道的注意点.html">
            
                    
                    5、管道的注意点
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.6" >
            
                <span>
            
                    
                    单元测试
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.6.1" data-path="../golang/单元测试/1、单元测试入门.html">
            
                <a href="../golang/单元测试/1、单元测试入门.html">
            
                    
                    1、单元测试入门
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.7" >
            
                <span>
            
                    
                    反射
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.7.1" data-path="../golang/反射/1、反射.html">
            
                <a href="../golang/反射/1、反射.html">
            
                    
                    1、反射
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.2" data-path="../golang/反射/2、反射的使用细节.html">
            
                <a href="../golang/反射/2、反射的使用细节.html">
            
                    
                    2、反射的使用细节
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.8" >
            
                <span>
            
                    
                    常量
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.8.1" data-path="../golang/常量/1、常量.html">
            
                <a href="../golang/常量/1、常量.html">
            
                    
                    1、常量
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.9" >
            
                <span>
            
                    
                    文件操作
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.9.1" data-path="../golang/文件操作/1、读取文件.html">
            
                <a href="../golang/文件操作/1、读取文件.html">
            
                    
                    1、读取文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.2" data-path="../golang/文件操作/2、写文件.html">
            
                <a href="../golang/文件操作/2、写文件.html">
            
                    
                    2、写文件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.10" >
            
                <span>
            
                    
                    网络编程
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.10.1" data-path="../golang/网络编程/1、网络编程基础.html">
            
                <a href="../golang/网络编程/1、网络编程基础.html">
            
                    
                    1、网络编程基础
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.11" >
            
                <span>
            
                    
                    面向对象
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.11.1" data-path="../golang/面向对象/1、go使用struct实现OOP.html">
            
                <a href="../golang/面向对象/1、go使用struct实现OOP.html">
            
                    
                    1、go使用struct实现OOP
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.11.2" data-path="../golang/面向对象/2、方法.html">
            
                <a href="../golang/面向对象/2、方法.html">
            
                    
                    2、方法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.11.3" data-path="../golang/面向对象/3、封装.html">
            
                <a href="../golang/面向对象/3、封装.html">
            
                    
                    3、封装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.11.4" data-path="../golang/面向对象/4、继承.html">
            
                <a href="../golang/面向对象/4、继承.html">
            
                    
                    4、继承
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.11.5" data-path="../golang/面向对象/5、接口.html">
            
                <a href="../golang/面向对象/5、接口.html">
            
                    
                    5、接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.11.6" data-path="../golang/面向对象/6、多肽.html">
            
                <a href="../golang/面向对象/6、多肽.html">
            
                    
                    6、多肽
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.11.7" data-path="../golang/面向对象/7、类型断言.html">
            
                <a href="../golang/面向对象/7、类型断言.html">
            
                    
                    7、类型断言
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.12" data-path="../golang/1、windows下安装golang环境.html">
            
                <a href="../golang/1、windows下安装golang环境.html">
            
                    
                    1、windows下安装golang环境
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.13" data-path="../golang/2、webStorm安装go语言插件.html">
            
                <a href="../golang/2、webStorm安装go语言插件.html">
            
                    
                    2、webStorm安装go语言插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.14" data-path="../golang/3、go的一些语法风格.html">
            
                <a href="../golang/3、go的一些语法风格.html">
            
                    
                    3、go的一些语法风格
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.15" data-path="../golang/4、go语法-变量.html">
            
                <a href="../golang/4、go语法-变量.html">
            
                    
                    4、go语法-变量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.16" data-path="../golang/5、go语法--数据类型.html">
            
                <a href="../golang/5、go语法--数据类型.html">
            
                    
                    5、go语法--数据类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.17" data-path="../golang/6、go的整数类型.html">
            
                <a href="../golang/6、go的整数类型.html">
            
                    
                    6、go的整数类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.18" data-path="../golang/7、go的浮点类型.html">
            
                <a href="../golang/7、go的浮点类型.html">
            
                    
                    7、go的浮点类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.19" data-path="../golang/8、go的字符类型.html">
            
                <a href="../golang/8、go的字符类型.html">
            
                    
                    8、go的字符类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.20" data-path="../golang/9、go的bool类型.html">
            
                <a href="../golang/9、go的bool类型.html">
            
                    
                    9、go的bool类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.21" data-path="../golang/10、go的string类型.html">
            
                <a href="../golang/10、go的string类型.html">
            
                    
                    10、go的string类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.22" data-path="../golang/11、基本数据类型相互转换.html">
            
                <a href="../golang/11、基本数据类型相互转换.html">
            
                    
                    11、基本数据类型相互转换
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.23" data-path="../golang/12、基本数据类型和string的转换.html">
            
                <a href="../golang/12、基本数据类型和string的转换.html">
            
                    
                    12、基本数据类型和string的转换
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.24" data-path="../golang/13、go的指针.html">
            
                <a href="../golang/13、go的指针.html">
            
                    
                    13、go的指针
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.25" data-path="../golang/14、go的标识符.html">
            
                <a href="../golang/14、go的标识符.html">
            
                    
                    14、go的标识符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.26" data-path="../golang/15、go的关键字.html">
            
                <a href="../golang/15、go的关键字.html">
            
                    
                    15、go的关键字
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.27" data-path="../golang/16、go的运算符-算术运算.html">
            
                <a href="../golang/16、go的运算符-算术运算.html">
            
                    
                    16、go的运算符-算术运算
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.28" data-path="../golang/17、比较、赋值、逻辑运算符.html">
            
                <a href="../golang/17、比较、赋值、逻辑运算符.html">
            
                    
                    17、比较、赋值、逻辑运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.29" data-path="../golang/18、运算符的优先级.html">
            
                <a href="../golang/18、运算符的优先级.html">
            
                    
                    18、运算符的优先级
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.30" data-path="../golang/19、其他运算符.html">
            
                <a href="../golang/19、其他运算符.html">
            
                    
                    19、其他运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.31" data-path="../golang/20、go获取键盘输入.html">
            
                <a href="../golang/20、go获取键盘输入.html">
            
                    
                    20、go获取键盘输入
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.32" data-path="../golang/21、进制、位运算.html">
            
                <a href="../golang/21、进制、位运算.html">
            
                    
                    21、进制、位运算
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.33" data-path="../golang/22、if和switch语句.html">
            
                <a href="../golang/22、if和switch语句.html">
            
                    
                    22、if和switch语句
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.34" data-path="../golang/23、for循环.html">
            
                <a href="../golang/23、for循环.html">
            
                    
                    23、for循环
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.35" data-path="../golang/24、goto语句.html">
            
                <a href="../golang/24、goto语句.html">
            
                    
                    24、goto语句
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.36" data-path="../golang/25、函数1.html">
            
                <a href="../golang/25、函数1.html">
            
                    
                    25、函数1
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.37" data-path="../golang/26、包-package.html">
            
                <a href="../golang/26、包-package.html">
            
                    
                    26、包-package
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.38" data-path="../golang/27、init函数.html">
            
                <a href="../golang/27、init函数.html">
            
                    
                    27、init函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.39" data-path="../golang/28、匿名函数.html">
            
                <a href="../golang/28、匿名函数.html">
            
                    
                    28、匿名函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.40" data-path="../golang/29、闭包.html">
            
                <a href="../golang/29、闭包.html">
            
                    
                    29、闭包
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.41" data-path="../golang/30、defer.html">
            
                <a href="../golang/30、defer.html">
            
                    
                    30、defer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.42" data-path="../golang/31、值传递和引用传递.html">
            
                <a href="../golang/31、值传递和引用传递.html">
            
                    
                    31、值传递和引用传递
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.43" data-path="../golang/32、常用字符串函数.html">
            
                <a href="../golang/32、常用字符串函数.html">
            
                    
                    32、常用字符串函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.44" data-path="../golang/33、时间和日期函数.html">
            
                <a href="../golang/33、时间和日期函数.html">
            
                    
                    33、时间和日期函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.45" data-path="../golang/34、go语言的内置函数.html">
            
                <a href="../golang/34、go语言的内置函数.html">
            
                    
                    34、go语言的内置函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.46" data-path="../golang/35、go语言的错误处理.html">
            
                <a href="../golang/35、go语言的错误处理.html">
            
                    
                    35、go语言的错误处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.47" data-path="../golang/36、数组.html">
            
                <a href="../golang/36、数组.html">
            
                    
                    36、数组
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.48" data-path="../golang/37、切片slice.html">
            
                <a href="../golang/37、切片slice.html">
            
                    
                    37、切片slice
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.49" data-path="../golang/38、string和slice.html">
            
                <a href="../golang/38、string和slice.html">
            
                    
                    38、string 和 slice
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.50" data-path="../golang/39、二维数组.html">
            
                <a href="../golang/39、二维数组.html">
            
                    
                    39、二维数组
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.51" data-path="../golang/40、map的用法.html">
            
                <a href="../golang/40、map的用法.html">
            
                    
                    40、map的用法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.52" data-path="../golang/41、获取命令行参数.html">
            
                <a href="../golang/41、获取命令行参数.html">
            
                    
                    41、获取命令行参数
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../Istio/">
            
                <a href="../Istio/">
            
                    
                    Istio
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="./">
            
                <a href="./">
            
                    
                    Redis
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" >
            
                <span>
            
                    
                    golang连接redis
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1.1" data-path="golang连接redis/1、go语言连接使用redis.html">
            
                <a href="golang连接redis/1、go语言连接使用redis.html">
            
                    
                    1、go语言连接使用redis
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.1.2" data-path="golang连接redis/2、redis连接池.html">
            
                <a href="golang连接redis/2、redis连接池.html">
            
                    
                    2、redis连接池
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.2" >
            
                <span>
            
                    
                    protected-mode设置
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.2.1" data-path="protected-mode设置/1、设置保护模式.html">
            
                <a href="protected-mode设置/1、设置保护模式.html">
            
                    
                    1、设置保护模式
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="1、redis的安装.html">
            
                <a href="1、redis的安装.html">
            
                    
                    1、redis的安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="2、redis数据库的命令操作.html">
            
                <a href="2、redis数据库的命令操作.html">
            
                    
                    2、redis数据库的命令操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="3、string类型的操作.html">
            
                <a href="3、string类型的操作.html">
            
                    
                    3、string类型的操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="4、hash类型的操作.html">
            
                <a href="4、hash类型的操作.html">
            
                    
                    4、hash类型的操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="5、list类型的操作.html">
            
                <a href="5、list类型的操作.html">
            
                    
                    5、list类型的操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8" data-path="6、Set类型的操作.html">
            
                <a href="6、Set类型的操作.html">
            
                    
                    6、Set类型的操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9" data-path="7、docker安装redis.html">
            
                <a href="7、docker安装redis.html">
            
                    
                    7、docker安装redis
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10" data-path="8、redis集群搭建.html">
            
                <a href="8、redis集群搭建.html">
            
                    
                    8、redis集群搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.6.11" data-path="9、zset类型的操作.html">
            
                <a href="9、zset类型的操作.html">
            
                    
                    9、zset类型的操作
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" >
            
                <span>
            
                    
                    数据结构和算法
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../数据结构和算法/1、稀疏数组.html">
            
                <a href="../数据结构和算法/1、稀疏数组.html">
            
                    
                    1、稀疏数组
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../数据结构和算法/2、队列.html">
            
                <a href="../数据结构和算法/2、队列.html">
            
                    
                    2、队列
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../数据结构和算法/3、单向链表.html">
            
                <a href="../数据结构和算法/3、单向链表.html">
            
                    
                    3、单向链表
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../数据结构和算法/4、双向链表.html">
            
                <a href="../数据结构和算法/4、双向链表.html">
            
                    
                    4、双向链表
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.5" data-path="../数据结构和算法/5、单向环形链表.html">
            
                <a href="../数据结构和算法/5、单向环形链表.html">
            
                    
                    5、单向环形链表
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6" data-path="../数据结构和算法/6、约瑟夫问题.html">
            
                <a href="../数据结构和算法/6、约瑟夫问题.html">
            
                    
                    6、约瑟夫问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.7" data-path="../数据结构和算法/7、选择排序.html">
            
                <a href="../数据结构和算法/7、选择排序.html">
            
                    
                    7、选择排序
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.8" data-path="../数据结构和算法/8、插入排序.html">
            
                <a href="../数据结构和算法/8、插入排序.html">
            
                    
                    8、插入排序
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.9" data-path="../数据结构和算法/9、快速排序法.html">
            
                <a href="../数据结构和算法/9、快速排序法.html">
            
                    
                    9、快速排序法
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../springCloud/">
            
                <a href="../springCloud/">
            
                    
                    springCloud
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../springCloud/consul/">
            
                <a href="../springCloud/consul/">
            
                    
                    consul
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1.1" data-path="../springCloud/consul/1、springcloud服务注册到consul.html">
            
                <a href="../springCloud/consul/1、springcloud服务注册到consul.html">
            
                    
                    1、springcloud服务注册到consul
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.1.2" data-path="../springCloud/consul/2、springcloud消费consul中注册的服务.html">
            
                <a href="../springCloud/consul/2、springcloud消费consul中注册的服务.html">
            
                    
                    2、springcloud消费consul中注册的服务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.1.3" data-path="../springCloud/consul/3、springcloud使用consul做配置中心.html">
            
                <a href="../springCloud/consul/3、springcloud使用consul做配置中心.html">
            
                    
                    3、springcloud使用consul做配置中心
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../springCloud/springBoot/">
            
                <a href="../springCloud/springBoot/">
            
                    
                    springBoot
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.2.1" >
            
                <span>
            
                    
                    一些问题解决方式
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.2.1.1" data-path="../springCloud/springBoot/一些问题解决方式/1、StreamingResponseBody问题.html">
            
                <a href="../springCloud/springBoot/一些问题解决方式/1、StreamingResponseBody问题.html">
            
                    
                    1、StreamingResponseBody问题
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8.2.2" data-path="../springCloud/springBoot/1、新建springboot工程.html">
            
                <a href="../springCloud/springBoot/1、新建springboot工程.html">
            
                    
                    1、新建springboot工程
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../springCloud/1、Eureka服务注册中心.html">
            
                <a href="../springCloud/1、Eureka服务注册中心.html">
            
                    
                    1、Eureka服务注册中心
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.4" data-path="../springCloud/2、服务调用.html">
            
                <a href="../springCloud/2、服务调用.html">
            
                    
                    2、服务调用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.5" data-path="../springCloud/3、断路器hystrix的使用.html">
            
                <a href="../springCloud/3、断路器hystrix的使用.html">
            
                    
                    3、断路器hystrix的使用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.6" data-path="../springCloud/4、断路器hystrix的隔离策略.html">
            
                <a href="../springCloud/4、断路器hystrix的隔离策略.html">
            
                    
                    4、断路器hystrix的隔离策略
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.7" data-path="../springCloud/5、hystrix的Dashboard和Turbine.html">
            
                <a href="../springCloud/5、hystrix的Dashboard和Turbine.html">
            
                    
                    5、hystrix的Dashboard和Turbine
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../vpn/">
            
                <a href="../vpn/">
            
                    
                    Vpn
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" data-path="../vpn/1、ss服务器的安装.html">
            
                <a href="../vpn/1、ss服务器的安装.html">
            
                    
                    1、ss服务器的安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" data-path="../vpn/2、SS客户端.html">
            
                <a href="../vpn/2、SS客户端.html">
            
                    
                    2、SS客户端
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" >
            
                <span>
            
                    
                    gitbook的使用
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" data-path="../gitbook的使用/1、gitbook的使用.html">
            
                <a href="../gitbook的使用/1、gitbook的使用.html">
            
                    
                    1、gitbook 的使用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" data-path="../gitbook的使用/2、gitbook命令.html">
            
                <a href="../gitbook的使用/2、gitbook命令.html">
            
                    
                    2、gitbook命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.3" data-path="../gitbook的使用/3、gitbook连续大括号的解决方式.html">
            
                <a href="../gitbook的使用/3、gitbook连续大括号的解决方式.html">
            
                    
                    3、gitbook连续大括号的解决方式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.4" data-path="../gitbook的使用/4、gitbook插件.html">
            
                <a href="../gitbook的使用/4、gitbook插件.html">
            
                    
                    4、gitbook插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.5" data-path="../gitbook的使用/5、去掉-本书由gitbook发布.html">
            
                <a href="../gitbook的使用/5、去掉-本书由gitbook发布.html">
            
                    
                    5、去掉-本书由gitbook发布
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.11" >
            
                <span>
            
                    
                    markdown学习
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.11.1" data-path="../markdown学习/1、markdown的学习.html">
            
                <a href="../markdown学习/1、markdown的学习.html">
            
                    
                    1、markdown的学习
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="../keycloak/">
            
                <a href="../keycloak/">
            
                    
                    keycloak
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.12.1" data-path="../keycloak/1、keycloak的简单使用.html">
            
                <a href="../keycloak/1、keycloak的简单使用.html">
            
                    
                    1、keycloak的简单使用
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.13" >
            
                <span>
            
                    
                    分布式事务
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.13.1" data-path="../分布式事务/1、事务的介绍.html">
            
                <a href="../分布式事务/1、事务的介绍.html">
            
                    
                    1、事务的介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.2" data-path="../分布式事务/2、分布式事务的理论.html">
            
                <a href="../分布式事务/2、分布式事务的理论.html">
            
                    
                    2、分布式事务的理论
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >9、zset类型的操作</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><ul><li><span class="title-icon "></span><a href="#&#x4E00;&#x3001;sorted-sets&#x7684;&#x4ECB;&#x7ECD;&#x3002;"><b>1.1. </b>&#x4E00;&#x3001;Sorted sets&#x7684;&#x4ECB;&#x7ECD;&#x3002;</a></li><ul><li><span class="title-icon "></span><a href="#&#x6392;&#x5E8F;&#x65B9;&#x5F0F;&#xFF1A;"><b>1.1.1. </b>&#x6392;&#x5E8F;&#x65B9;&#x5F0F;&#xFF1A;</a></li><li><span class="title-icon "></span><a href="#&#x76F8;&#x540C;&#x5206;&#x6570;&#x7684;&#x6210;&#x5458;"><b>1.1.2. </b>&#x76F8;&#x540C;&#x5206;&#x6570;&#x7684;&#x6210;&#x5458;</a></li><li><span class="title-icon "></span><a href="#&#x5E94;&#x7528;&#x573A;&#x666F;&#xFF1A;"><b>1.1.3. </b>&#x5E94;&#x7528;&#x573A;&#x666F;&#xFF1A;</a></li></ul><li><span class="title-icon "></span><a href="#&#x4E8C;&#x3001;sorted-sets-&#x7684;&#x64CD;&#x4F5C;&#x3002;"><b>1.2. </b>&#x4E8C;&#x3001;Sorted sets &#x7684;&#x64CD;&#x4F5C;&#x3002;</a></li><ul><li><span class="title-icon "></span><a href="#21&#x3001;&#x589E;&#x52A0;&#x3002;"><b>1.2.1. </b>2.1&#x3001;&#x589E;&#x52A0;&#x3002;</a></li><li><span class="title-icon "></span><a href="#22&#x3001;&#x67E5;&#x8BE2;&#x3002;"><b>1.2.2. </b>2.2&#x3001;&#x67E5;&#x8BE2;&#x3002;</a></li><li><span class="title-icon "></span><a href="#23&#x3001;&#x4FEE;&#x6539;&#x3002;"><b>1.2.3. </b>2.3&#x3001;&#x4FEE;&#x6539;&#x3002;</a></li><li><span class="title-icon "></span><a href="#24&#x3001;&#x5220;&#x9664;&#x3002;"><b>1.2.4. </b>2.4&#x3001;&#x5220;&#x9664;&#x3002;</a></li></ul></ul></ul></div><a href="#" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a><h2 id="&#x4E00;&#x3001;sorted-sets&#x7684;&#x4ECB;&#x7ECD;&#x3002;"><a name="&#x4E00;&#x3001;sorted-sets&#x7684;&#x4ECB;&#x7ECD;&#x3002;" class="anchor-navigation-ex-anchor" href="#&#x4E00;&#x3001;sorted-sets&#x7684;&#x4ECB;&#x7ECD;&#x3002;"><i class="fa fa-link" aria-hidden="true"></i></a>1.1. &#x4E00;&#x3001;Sorted sets&#x7684;&#x4ECB;&#x7ECD;&#x3002;</h2>
<p>Sorted sets&#x4E5F;&#x53EB;zset&#xFF0C;&#x662F;&#x4E00;&#x79CD;&#x6570;&#x636E;&#x7ED3;&#x6784;&#xFF0C;&#x7C7B;&#x4F3C;&#x4E8E;&#x96C6;&#x5408;&#x548C;&#x54C8;&#x5E0C;&#x4E4B;&#x95F4;&#x7684;&#x6DF7;&#x5408;&#x3002;&#x50CF;&#x96C6;&#x5408;&#x4E00;&#x6837;&#xFF0C;Sorted sets&#x7531;&#x552F;&#x4E00;&#x7684;&#x975E;&#x91CD;&#x590D;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#x5143;&#x7D20;&#x7EC4;&#x6210;&#xFF0C;&#x56E0;&#x6B64;&#x4ECE;&#x67D0;&#x79CD;&#x610F;&#x4E49;&#x4E0A;&#x8BF4;&#xFF0C;Sorted sets&#x4E5F;&#x662F;&#x4E00;&#x4E2A;&#x96C6;&#x5408;&#x3002;Sorted sets&#x7684;&#x6BCF;&#x4E2A;&#x5143;&#x7D20;&#x90FD;&#x4E0E;&#x4E00;&#x4E2A;&#x6D6E;&#x70B9;&#x503C;&#x7C7B;&#x578B;&#x7684;&#x5F97;&#x5206;&#xFF08;score&#xFF09;&#x76F8;&#x5173;&#x8054;&#x3002;&#x6392;&#x5E8F;&#x89C4;&#x5219;&#x5982;&#x4E0B;&#xFF1A;</p>
<ul>
<li>&#x5982;&#x679C;A&#x548C;B&#x662F;&#x4E24;&#x4E2A;&#x5206;&#x6570;&#xFF08;score&#xFF09;&#x4E0D;&#x540C;&#x7684;&#x5143;&#x7D20;&#xFF0C;&#x5982;&#x679C;A.score &gt; B.score&#xFF0C;&#x5219;A&gt;B&#x3002;</li>
<li>&#x5982;&#x679C;A&#x548C;B&#x7684;&#x5206;&#x6570;&#xFF08;score&#xFF09;&#x5B8C;&#x5168;&#x76F8;&#x540C;&#xFF0C;&#x90A3;&#x4E48;&#x5982;&#x679C;A&#x5B57;&#x7B26;&#x4E32;&#x5728;&#x5B57;&#x5178;&#x4E0A;&#x5927;&#x4E8E;B&#x5B57;&#x7B26;&#x4E32;&#xFF0C;&#x5219;A&gt;B&#x3002;&#xFF08;A&#x548C;B&#x5B57;&#x7B26;&#x4E32;&#x4E0D;&#x80FD;&#x76F8;&#x7B49;&#xFF0C;&#x56E0;&#x4E3A;Sorted sets&#x4E2D;&#x5143;&#x7D20;&#x662F;&#x552F;&#x4E00;&#x7684;&#xFF09;&#x3002;</li>
</ul>
<h3 id="&#x6392;&#x5E8F;&#x65B9;&#x5F0F;&#xFF1A;"><a name="&#x6392;&#x5E8F;&#x65B9;&#x5F0F;&#xFF1A;" class="anchor-navigation-ex-anchor" href="#&#x6392;&#x5E8F;&#x65B9;&#x5F0F;&#xFF1A;"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.1. &#x6392;&#x5E8F;&#x65B9;&#x5F0F;&#xFF1A;</h3>
<p>Sorted sets&#x6309;&#x7167;&#x5206;&#x6570;&#x4EE5;&#x9012;&#x589E;&#x7684;&#x65B9;&#x5F0F;&#x8FDB;&#x884C;&#x6392;&#x5E8F;&#x3002;&#x76F8;&#x540C;&#x7684;&#x6210;&#x5458;&#xFF08;member&#xFF09;&#x53EA;&#x5B58;&#x5728;&#x4E00;&#x6B21;&#xFF0C;Sorted sets&#x4E0D;&#x5141;&#x8BB8;&#x5B58;&#x5728;&#x91CD;&#x590D;&#x7684;&#x6210;&#x5458;&#x3002; &#x5206;&#x6570;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;<code>ZADD</code>&#x547D;&#x4EE4;&#x8FDB;&#x884C;&#x66F4;&#x65B0;&#x6216;&#x8005;&#x4E5F;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;<code>ZINCRBY</code>&#x547D;&#x4EE4;&#x9012;&#x589E;&#x6765;&#x4FEE;&#x6539;&#x4E4B;&#x524D;&#x7684;&#x503C;&#xFF0C;&#x76F8;&#x5E94;&#x7684;&#x4ED6;&#x4EEC;&#x7684;&#x6392;&#x5E8F;&#x4F4D;&#x7F6E;&#x4E5F;&#x4F1A;&#x968F;&#x7740;&#x5206;&#x6570;&#x53D8;&#x5316;&#x800C;&#x6539;&#x53D8;&#x3002;</p>
<p>&#x83B7;&#x53D6;&#x4E00;&#x4E2A;&#x6210;&#x5458;&#x5F53;&#x524D;&#x7684;&#x5206;&#x6570;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;<a href="http://www.redis.cn/commands/zscore.html" target="_blank">ZSCORE</a>&#x547D;&#x4EE4;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x7528;&#x5B83;&#x6765;&#x9A8C;&#x8BC1;&#x6210;&#x5458;&#x662F;&#x5426;&#x5B58;&#x5728;&#x3002;</p>
<p>&#x66F4;&#x591A;&#x5173;&#x4E8E;&#x6709;&#x5E8F;&#x96C6;&#x5408;&#x7684;&#x4FE1;&#x606F;&#x8BF7;&#x53C2;&#x8003;<a href="http://www.redis.cn/topics/data-types.html#sorted-sets" target="_blank">&#x6570;&#x636E;&#x7C7B;&#x578B;-&#x6709;&#x5E8F;&#x96C6;&#x5408;</a>&#x3002;</p>
<h3 id="&#x76F8;&#x540C;&#x5206;&#x6570;&#x7684;&#x6210;&#x5458;"><a name="&#x76F8;&#x540C;&#x5206;&#x6570;&#x7684;&#x6210;&#x5458;" class="anchor-navigation-ex-anchor" href="#&#x76F8;&#x540C;&#x5206;&#x6570;&#x7684;&#x6210;&#x5458;"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.2. &#x76F8;&#x540C;&#x5206;&#x6570;&#x7684;&#x6210;&#x5458;</h3>
<p>Sorted sets&#x91CC;&#x9762;&#x7684;&#x6210;&#x5458;&#x662F;&#x4E0D;&#x80FD;&#x91CD;&#x590D;&#x7684;&#x90FD;&#x662F;&#x552F;&#x4E00;&#x7684;&#xFF0C;&#x4F46;&#x662F;&#xFF0C;&#x4E0D;&#x540C;&#x6210;&#x5458;&#x95F4;&#x6709;&#x53EF;&#x80FD;<em>&#x6709;&#x76F8;&#x540C;&#x7684;&#x5206;&#x6570;</em>&#x3002;&#x5F53;&#x591A;&#x4E2A;&#x6210;&#x5458;&#x6709;&#x76F8;&#x540C;&#x7684;&#x5206;&#x6570;&#x65F6;&#xFF0C;&#x4ED6;&#x4EEC;&#x5C06;&#x662F;<em>&#x6709;&#x5E8F;&#x7684;&#x5B57;&#x5178;</em>&#xFF08;ordered lexicographically&#xFF09;&#xFF08;&#x4ECD;&#x7531;&#x5206;&#x6570;&#x4F5C;&#x4E3A;&#x7B2C;&#x4E00;&#x6392;&#x5E8F;&#x6761;&#x4EF6;&#xFF0C;&#x7136;&#x540E;&#xFF0C;&#x76F8;&#x540C;&#x5206;&#x6570;&#x7684;&#x6210;&#x5458;&#x6309;&#x7167;&#x5B57;&#x5178;&#x89C4;&#x5219;&#x76F8;&#x5BF9;&#x6392;&#x5E8F;&#xFF09;&#x3002;</p>
<p>&#x5B57;&#x5178;&#x987A;&#x5E8F;&#x6392;&#x5E8F;&#x7528;&#x7684;&#x662F;&#x4E8C;&#x8FDB;&#x5236;&#xFF0C;&#x5B83;&#x6BD4;&#x8F83;&#x7684;&#x662F;&#x5B57;&#x7B26;&#x4E32;&#x7684;&#x5B57;&#x8282;&#x6570;&#x7EC4;&#x3002;</p>
<p>&#x5982;&#x679C;&#x7528;&#x6237;&#x5C06;&#x6240;&#x6709;&#x5143;&#x7D20;&#x8BBE;&#x7F6E;&#x76F8;&#x540C;&#x5206;&#x6570;&#xFF08;&#x4F8B;&#x5982;0&#xFF09;&#xFF0C;&#x6709;&#x5E8F;&#x96C6;&#x5408;&#x91CC;&#x9762;&#x7684;&#x6240;&#x6709;&#x5143;&#x7D20;&#x5C06;&#x6309;&#x7167;&#x5B57;&#x5178;&#x987A;&#x5E8F;&#x8FDB;&#x884C;&#x6392;&#x5E8F;&#xFF0C;&#x8303;&#x56F4;&#x67E5;&#x8BE2;&#x5143;&#x7D20;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;<a href="http://www.redis.cn/commands/zrangebylex.html" target="_blank">ZRANGEBYLEX</a>&#x547D;&#x4EE4;&#xFF08;&#x6CE8;&#xFF1A;&#x8303;&#x56F4;&#x67E5;&#x8BE2;&#x5206;&#x6570;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;<a href="http://www.redis.cn/commands/zrangebyscore.html" target="_blank">ZRANGEBYSCORE</a>&#x547D;&#x4EE4;&#xFF09;&#x3002;</p>
<h3 id="&#x5E94;&#x7528;&#x573A;&#x666F;&#xFF1A;"><a name="&#x5E94;&#x7528;&#x573A;&#x666F;&#xFF1A;" class="anchor-navigation-ex-anchor" href="#&#x5E94;&#x7528;&#x573A;&#x666F;&#xFF1A;"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.3. &#x5E94;&#x7528;&#x573A;&#x666F;&#xFF1A;</h3>
<ul>
<li>topN&#x7684;&#x60C5;&#x51B5;&#x3002;&#x6BD4;&#x5982;&#xFF1A;&#x7535;&#x5546;&#x4E2D;&#x7684;&#x70ED;&#x9500;&#x5546;&#x54C1;&#x3002;</li>
<li>&#x5B57;&#x7B26;&#x4E32;&#x6392;&#x5E8F;&#x3002;&#x6BD4;&#x5982;&#xFF1A;&#x7701;&#x5E02;&#x533A;&#x6839;&#x636E;&#x540D;&#x5B57;&#x6392;&#x5E8F;&#x3002;&#x53EF;&#x4EE5;&#x628A;&#x5206;&#x6570;&#xFF08;score&#xFF09;&#x8BBE;&#x7F6E;&#x76F8;&#x540C;&#x3002;&#x67E5;&#x8BE2;&#x51FA;&#x7684;&#x5C31;&#x662F;&#x6309;&#x7167;&#x540D;&#x5B57;&#x6392;&#x5E8F;&#x7684;&#x3002;</li>
</ul>
<h2 id="&#x4E8C;&#x3001;sorted-sets-&#x7684;&#x64CD;&#x4F5C;&#x3002;"><a name="&#x4E8C;&#x3001;sorted-sets-&#x7684;&#x64CD;&#x4F5C;&#x3002;" class="anchor-navigation-ex-anchor" href="#&#x4E8C;&#x3001;sorted-sets-&#x7684;&#x64CD;&#x4F5C;&#x3002;"><i class="fa fa-link" aria-hidden="true"></i></a>1.2. &#x4E8C;&#x3001;Sorted sets &#x7684;&#x64CD;&#x4F5C;&#x3002;</h2>
<h3 id="21&#x3001;&#x589E;&#x52A0;&#x3002;"><a name="21&#x3001;&#x589E;&#x52A0;&#x3002;" class="anchor-navigation-ex-anchor" href="#21&#x3001;&#x589E;&#x52A0;&#x3002;"><i class="fa fa-link" aria-hidden="true"></i></a>1.2.1. 2.1&#x3001;&#x589E;&#x52A0;&#x3002;</h3>
<p>&#x589E;&#x52A0;&#x4E00;&#x4E2A;Sorted sets&#x7684;&#x547D;&#x4EE4;&#x662F;&#xFF1A;<code>zadd key [NX|XX] [CH] [INCR] score member [score member ...]</code></p>
<p>ZADD &#x547D;&#x4EE4;&#x5728;<code>key</code>&#x540E;&#x9762;&#x662F;&#x5206;&#x6570;/&#x6210;&#x5458;&#xFF08;score/member&#xFF09;&#x5BF9;&#x524D;&#x9762;&#x652F;&#x6301;&#x4E00;&#x4E9B;&#x53C2;&#x6570;&#xFF0C;&#x4ED6;&#x4EEC;&#x662F;&#xFF1A;</p>
<ul>
<li><strong>XX</strong>: &#x4EC5;&#x4EC5;&#x66F4;&#x65B0;&#x5B58;&#x5728;&#x7684;&#x6210;&#x5458;&#xFF0C;&#x4E0D;&#x6DFB;&#x52A0;&#x65B0;&#x6210;&#x5458;&#x3002;</li>
<li><strong>NX</strong>: &#x4E0D;&#x66F4;&#x65B0;&#x5B58;&#x5728;&#x7684;&#x6210;&#x5458;&#x3002;&#x53EA;&#x6DFB;&#x52A0;&#x65B0;&#x6210;&#x5458;&#x3002;</li>
<li><strong>CH</strong>: &#x4FEE;&#x6539;&#x8FD4;&#x56DE;&#x503C;&#x4E3A;&#x53D1;&#x751F;&#x53D8;&#x5316;&#x7684;&#x6210;&#x5458;&#x603B;&#x6570;(CH &#x662F; <em>changed</em> &#x7684;&#x610F;&#x601D;)&#x3002;&#x9ED8;&#x8BA4;&#x662F;&#x8FD4;&#x56DE;&#x65B0;&#x6DFB;&#x52A0;&#x6210;&#x5458;&#x7684;&#x603B;&#x6570; &#x3002;&#x66F4;&#x6539;&#x7684;&#x5143;&#x7D20;&#x662F;<strong>&#x65B0;&#x6DFB;&#x52A0;&#x7684;&#x6210;&#x5458;</strong>&#xFF0C;&#x5DF2;&#x7ECF;&#x5B58;&#x5728;&#x7684;&#x6210;&#x5458;<strong>&#x66F4;&#x65B0;&#x5206;&#x6570;</strong>&#x3002; &#x6240;&#x4EE5;&#x5728;&#x547D;&#x4EE4;&#x4E2D;&#x6307;&#x5B9A;&#x7684;&#x6210;&#x5458;&#x6709;&#x76F8;&#x540C;&#x7684;&#x5206;&#x6570;&#x5C06;&#x4E0D;&#x88AB;&#x8BA1;&#x7B97;&#x5728;&#x5185;&#x3002;&#x6CE8;&#xFF1A;&#x5728;&#x901A;&#x5E38;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;<code>ZADD</code>&#x8FD4;&#x56DE;&#x503C;&#x53EA;&#x8BA1;&#x7B97;&#x65B0;&#x6DFB;&#x52A0;&#x6210;&#x5458;&#x7684;&#x6570;&#x91CF;&#x3002;</li>
<li><strong>INCR</strong>: &#x5F53;<code>ZADD</code>&#x6307;&#x5B9A;&#x8FD9;&#x4E2A;&#x9009;&#x9879;&#x65F6;&#xFF0C;&#x6210;&#x5458;&#x7684;&#x64CD;&#x4F5C;&#x5C31;&#x7B49;&#x540C;<a href="http://www.redis.cn/commands/zincrby.html" target="_blank">ZINCRBY</a>&#x547D;&#x4EE4;&#xFF0C;&#x5BF9;&#x6210;&#x5458;&#x7684;&#x5206;&#x6570;&#x8FDB;&#x884C;&#x9012;&#x589E;&#x64CD;&#x4F5C;&#x3002;</li>
</ul>
<p>&#x4F8B;&#x5B50;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash"><span class="token comment"># &#x7ED9; mystus &#x952E;&#xFF0C;&#x6DFB;&#x52A0;2&#x4E2A;&#x5143;&#x7D20;&#xFF1A;zhangsan 30&#x5206;&#xFF0C;lisi 60&#x5206;&#x3002;&#x8FD4;&#x56DE;&#x503C;&#x662F;&#x6DFB;&#x52A0;&#x4E86;&#x591A;&#x5C11;&#x5143;&#x7D20;&#x3002;</span>
<span class="token comment"># mystus &#x5C31;&#x662F;&#x6839;&#x636E;&#x5F97;&#x5206;&#x6392;&#x5E8F;&#x7684;&#x6709;&#x5E8F;&#x96C6;&#x5408;&#xFF08;Sorted sets&#xFF09;&#x3002;</span>
localhost:637<span class="token operator"><span class="token file-descriptor important">9</span>&gt;</span> zadd mystus <span class="token number">30</span> zhangsan <span class="token number">60</span> lisi
<span class="token punctuation">(</span>integer<span class="token punctuation">)</span> <span class="token number">2</span>
<span class="token comment"># &#x7ED9; mystus &#x952E;&#xFF0C;&#x6DFB;&#x52A0;1&#x4E2A;&#x5143;&#x7D20;&#xFF1A;wanger 40&#x5206;</span>
localhost:637<span class="token operator"><span class="token file-descriptor important">9</span>&gt;</span> zadd mystus <span class="token number">40</span> wanger
<span class="token punctuation">(</span>integer<span class="token punctuation">)</span> <span class="token number">1</span>
</code></pre>
<p><a href="https://redis.io/commands/zadd" target="_blank">ZADD</a>&#x4E0E;<a href="https://redis.io/commands/sadd" target="_blank">SADD</a>&#x76F8;&#x4F3C;&#xFF0C;&#x4F46;&#x662F;&#x4F7F;&#x7528;&#x4E00;&#x4E2A;&#x989D;&#x5916;&#x7684;&#x53C2;&#x6570;&#xFF08;&#x653E;&#x7F6E;&#x5728;&#x8981;&#x6DFB;&#x52A0;&#x7684;&#x5143;&#x7D20;&#x4E4B;&#x524D;&#xFF09;&#x4F5C;&#x4E3A;&#x5F97;&#x5206;&#x3002;</p>
<h3 id="22&#x3001;&#x67E5;&#x8BE2;&#x3002;"><a name="22&#x3001;&#x67E5;&#x8BE2;&#x3002;" class="anchor-navigation-ex-anchor" href="#22&#x3001;&#x67E5;&#x8BE2;&#x3002;"><i class="fa fa-link" aria-hidden="true"></i></a>1.2.2. 2.2&#x3001;&#x67E5;&#x8BE2;&#x3002;</h3>
<h4 id="221&#x3001;&#x4F7F;&#x7528;&#x7D22;&#x5F15;&#x67E5;&#x8BE2;&#x5143;&#x7D20;&#x3002;"><a name="221&#x3001;&#x4F7F;&#x7528;&#x7D22;&#x5F15;&#x67E5;&#x8BE2;&#x5143;&#x7D20;&#x3002;" class="anchor-navigation-ex-anchor" href="#221&#x3001;&#x4F7F;&#x7528;&#x7D22;&#x5F15;&#x67E5;&#x8BE2;&#x5143;&#x7D20;&#x3002;"><i class="fa fa-link" aria-hidden="true"></i></a>2.2.1&#x3001;&#x4F7F;&#x7528;&#x7D22;&#x5F15;&#x67E5;&#x8BE2;&#x5143;&#x7D20;&#x3002;</h4>
<ul>
<li><p><strong>&#x67E5;&#x8BE2;&#x547D;&#x4EE4;&#xFF0C;&#x6309;&#x5206;&#x6570;&#x6B63;&#x5E8F;&#x8FD4;&#x56DE;</strong>&#xFF1A;<code>ZRANGE key start stop [WITHSCORES]</code></p>
<p>start&#xFF1A;&#x8868;&#x793A;&#x7D22;&#x5F15;&#x7684;&#x5F00;&#x59CB;&#x4F4D;&#x7F6E;&#x3002;&#x6700;&#x5C0F;&#x503C;&#x4ECE;0&#x5F00;&#x59CB;&#x3002;&#x8FD4;&#x56DE;&#x503C;&#x5305;&#x542B;start&#x7684;&#x5143;&#x7D20;&#x3002;</p>
<p>stop&#xFF1A;&#x8868;&#x793A;&#x7D22;&#x5F15;&#x7684;&#x7ED3;&#x675F;&#x4F4D;&#x7F6E;&#x3002;-1&#x8868;&#x793A;&#x6700;&#x540E;&#x4E00;&#x4E2A;&#x5143;&#x7D20;&#x3002;&#x8FD4;&#x56DE;&#x503C;&#x5305;&#x542B;stop&#x7684;&#x5143;&#x7D20;&#x3002;</p>
<p>withscores&#xFF1A;&#x662F;&#x5426;&#x8FDE;&#x5206;&#x6570;&#x4E00;&#x8D77;&#x67E5;&#x8BE2;&#x3002;</p>
</li>
<li><p><strong>&#x67E5;&#x8BE2;&#x547D;&#x4EE4;&#xFF0C;&#x6309;&#x5206;&#x6570;&#x5012;&#x5E8F;&#x65B9;&#x5F0F;&#x8FD4;&#x56DE;</strong>&#xFF1A;<code>ZREVRANGE key start stop [WITHSCORES]</code></p>
</li>
</ul>
<p><strong>&#x4F8B;&#x5B50;1</strong>&#xFF1A;&#x67E5;&#x8BE2;&#x96C6;&#x5408;&#x6240;&#x6709;&#x7684;&#x5143;&#x7D20;&#x3002;</p>
<p>&#x6CE8;&#x610F;&#xFF1A;0&#x548C;-1&#x8868;&#x793A;&#x4ECE;&#x5143;&#x7D20;&#x7D22;&#x5F15;0&#x5230;&#x6700;&#x540E;&#x4E00;&#x4E2A;&#x5143;&#x7D20;&#x3002;</p>
<pre class="language-"><code>localhost:6379&gt; ZRANGE mystus 0 -1
1) &quot;zhangsan&quot;
2) &quot;wanger&quot;
3) &quot;lisi&quot;
</code></pre><p><strong>&#x4F8B;&#x5B50;2</strong>&#xFF1A;&#x5E26;&#x4E0A;&#x5206;&#x6570;&#x3002;</p>
<pre class="language-"><code>localhost:6379&gt; ZRANGE mystus 0 1 withscores
1) &quot;zhangsan&quot;
2) &quot;30&quot;
3) &quot;wanger&quot;
4) &quot;40&quot;
</code></pre><p><strong>&#x4F8B;&#x5B50;3</strong>&#xFF1A;&#x6309;&#x7167;&#x5206;&#x6570;&#x5012;&#x5E8F;&#x8FD4;&#x56DE;&#x3002;</p>
<pre class="language-"><code>localhost:6379&gt; ZREVRANGE mystus 0 -1 withscores
1) &quot;lisi&quot;
2) &quot;60&quot;
3) &quot;wanger&quot;
4) &quot;40&quot;
5) &quot;zhangsan&quot;
6) &quot;30&quot;
localhost:6379&gt; ZREVRANGE mystus 0 -1
1) &quot;lisi&quot;
2) &quot;wanger&quot;
3) &quot;zhangsan&quot;
</code></pre><h4 id="222&#x3001;&#x4F7F;&#x7528;&#x7D22;&#x5F15;&#x5206;&#x9875;&#x67E5;&#x8BE2;&#x5143;&#x7D20;&#x3002;"><a name="222&#x3001;&#x4F7F;&#x7528;&#x7D22;&#x5F15;&#x5206;&#x9875;&#x67E5;&#x8BE2;&#x5143;&#x7D20;&#x3002;" class="anchor-navigation-ex-anchor" href="#222&#x3001;&#x4F7F;&#x7528;&#x7D22;&#x5F15;&#x5206;&#x9875;&#x67E5;&#x8BE2;&#x5143;&#x7D20;&#x3002;"><i class="fa fa-link" aria-hidden="true"></i></a>2.2.2&#x3001;&#x4F7F;&#x7528;&#x7D22;&#x5F15;&#x5206;&#x9875;&#x67E5;&#x8BE2;&#x5143;&#x7D20;&#x3002;</h4>
<p>&#x547D;&#x4EE4;&#xFF1A;<code>ZRANGEBYLEX key min max [LIMIT offset count]</code></p>
<p>&#x8FD9;&#x4E2A;&#x547D;&#x4EE4;&#x7684;&#x4F7F;&#x7528;&#x5185;&#x5BB9;&#x6BD4;&#x8F83;&#x591A;&#xFF0C;&#x53C2;&#x8003;&#x5B98;&#x65B9;&#x4E2D;&#x6587;&#x6587;&#x6863;&#xFF1A;<a href="http://www.redis.cn/commands/zrangebylex.html" target="_blank">http://www.redis.cn/commands/zrangebylex.html</a></p>
<h4 id="223&#x3001;&#x4F7F;&#x7528;&#x5206;&#x6570;&#x5206;&#x9875;&#x67E5;&#x8BE2;&#x5143;&#x7D20;&#x3002;"><a name="223&#x3001;&#x4F7F;&#x7528;&#x5206;&#x6570;&#x5206;&#x9875;&#x67E5;&#x8BE2;&#x5143;&#x7D20;&#x3002;" class="anchor-navigation-ex-anchor" href="#223&#x3001;&#x4F7F;&#x7528;&#x5206;&#x6570;&#x5206;&#x9875;&#x67E5;&#x8BE2;&#x5143;&#x7D20;&#x3002;"><i class="fa fa-link" aria-hidden="true"></i></a>2.2.3&#x3001;&#x4F7F;&#x7528;&#x5206;&#x6570;&#x5206;&#x9875;&#x67E5;&#x8BE2;&#x5143;&#x7D20;&#x3002;</h4>
<p>&#x547D;&#x4EE4;&#xFF1A;<code>ZRANGEBYSCORE key min max [WITHSCORES] [LIMIT offset count]</code></p>
<blockquote>
<p>1&#x3001;&#x8FD4;&#x56DE;key&#x7684;&#x6709;&#x5E8F;&#x96C6;&#x5408;&#x4E2D;&#x7684;&#x5206;&#x6570;&#x5728;min&#x548C;max&#x4E4B;&#x95F4;&#x7684;&#x6240;&#x6709;&#x5143;&#x7D20;&#xFF08;&#x5305;&#x62EC;&#x5206;&#x6570;&#x7B49;&#x4E8E;max&#x6216;&#x8005;min&#x7684;&#x5143;&#x7D20;&#xFF09;&#x3002;&#x5143;&#x7D20;&#x88AB;&#x8BA4;&#x4E3A;&#x662F;&#x4ECE;&#x4F4E;&#x5206;&#x5230;&#x9AD8;&#x5206;&#x6392;&#x5E8F;&#x7684;&#x3002;&#x5177;&#x6709;&#x76F8;&#x540C;&#x5206;&#x6570;&#x7684;&#x5143;&#x7D20;&#x6309;&#x5B57;&#x5178;&#x5E8F;&#x6392;&#x5217;&#x3002;</p>
<p>2&#x3001;LIMIT&#x53C2;&#x6570;&#x6307;&#x5B9A;&#x8FD4;&#x56DE;&#x7ED3;&#x679C;&#x7684;&#x6570;&#x91CF;&#x53CA;&#x533A;&#x95F4;&#xFF08;&#x7C7B;&#x4F3C;SQL&#x4E2D;SELECT LIMIT offset, count&#xFF09;&#x3002;&#x6CE8;&#x610F;&#xFF0C;&#x5982;&#x679C;offset&#x592A;&#x5927;&#xFF0C;&#x5B9A;&#x4F4D;offset&#x5C31;&#x53EF;&#x80FD;&#x904D;&#x5386;&#x6574;&#x4E2A;&#x6709;&#x5E8F;&#x96C6;&#x5408;&#xFF0C;&#x8FD9;&#x4F1A;&#x589E;&#x52A0;O(N)&#x7684;&#x590D;&#x6742;&#x5EA6;&#x3002;</p>
<p>3&#x3001;&#x53C2;&#x6570;WITHSCORES&#x4F1A;&#x8FD4;&#x56DE;&#x5143;&#x7D20;&#x548C;&#x5176;&#x5206;&#x6570;&#xFF0C;&#x800C;&#x4E0D;&#x53EA;&#x662F;&#x5143;&#x7D20;&#x3002;</p>
<p>4&#x3001;min&#x548C;max&#x53EF;&#x4EE5;&#x7528;-inf&#x8868;&#x793A;&#x6700;&#x5C0F;&#x5206;&#x6570;&#xFF0C;+inf&#x8868;&#x793A;&#x6700;&#x5927;&#x5206;&#x6570;&#xFF0C;&#x8FD9;&#x6837;&#x4E00;&#x6765;&#xFF0C;&#x4F60;&#x5C31;&#x53EF;&#x4EE5;&#x5728;&#x4E0D;&#x77E5;&#x9053;&#x6709;&#x5E8F;&#x96C6;&#x7684;&#x6700;&#x4F4E;&#x548C;&#x6700;&#x9AD8;score&#x503C;&#x7684;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;&#x4F7F;&#x7528;ZRANGEBYSCORE&#x8FD9;&#x7C7B;&#x547D;&#x4EE4;&#x3002;</p>
<p>5&#x3001;&#x9ED8;&#x8BA4;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;min&#x548C;max&#x7684;&#x53D6;&#x503C;&#x662F;&#x5305;&#x542B;&#x5173;&#x7CFB;(&#x5C0F;&#x4E8E;&#x7B49;&#x4E8E;&#x6216;&#x5927;&#x4E8E;&#x7B49;&#x4E8E;)&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x7ED9;min&#x548C;max&#x53C2;&#x6570;&#x524D;&#x589E;&#x52A0;(&#x7B26;&#x53F7;&#x6765;&#x4F7F;&#x7528;&#x4E0D;&#x5305;&#x542B;&#x7684;&#x5173;&#x7CFB;(&#x5C0F;&#x4E8E;&#x6216;&#x5927;&#x4E8E;)&#x3002;</p>
</blockquote>
<p>&#x4F8B;&#x5B50;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash"><span class="token comment"># &#x67E5;&#x8BE2;&#x5168;&#x90E8;&#x5143;&#x7D20;&#x548C;&#x5206;&#x6570;</span>
localhost:637<span class="token operator"><span class="token file-descriptor important">9</span>&gt;</span> ZRANGE mystus <span class="token number">0</span> -1 withscores
<span class="token number">1</span><span class="token punctuation">)</span> <span class="token string">&quot;zhangsan&quot;</span>
<span class="token number">2</span><span class="token punctuation">)</span> <span class="token string">&quot;30&quot;</span>
<span class="token number">3</span><span class="token punctuation">)</span> <span class="token string">&quot;wanger&quot;</span>
<span class="token number">4</span><span class="token punctuation">)</span> <span class="token string">&quot;40&quot;</span>
<span class="token number">5</span><span class="token punctuation">)</span> <span class="token string">&quot;lisi&quot;</span>
<span class="token number">6</span><span class="token punctuation">)</span> <span class="token string">&quot;60&quot;</span>
<span class="token comment"># ZRANGEBYSCORE &#x67E5;&#x8BE2;&#x5168;&#x90E8;&#x5143;&#x7D20;</span>
localhost:637<span class="token operator"><span class="token file-descriptor important">9</span>&gt;</span> ZRANGEBYSCORE mystus -inf +inf
<span class="token number">1</span><span class="token punctuation">)</span> <span class="token string">&quot;zhangsan&quot;</span>
<span class="token number">2</span><span class="token punctuation">)</span> <span class="token string">&quot;wanger&quot;</span>
<span class="token number">3</span><span class="token punctuation">)</span> <span class="token string">&quot;lisi&quot;</span>
<span class="token comment"># ZRANGEBYSCORE &#x67E5;&#x8BE2;&#x5206;&#x6570;&gt;40 &#x7684;&#x5143;&#x7D20;</span>
localhost:637<span class="token operator"><span class="token file-descriptor important">9</span>&gt;</span> ZRANGEBYSCORE mystus <span class="token punctuation">(</span><span class="token number">40</span> +inf
<span class="token number">1</span><span class="token punctuation">)</span> <span class="token string">&quot;lisi&quot;</span>
<span class="token comment"># 30&lt;=&#x5206;&#x6570;&lt;40</span>
localhost:637<span class="token operator"><span class="token file-descriptor important">9</span>&gt;</span> ZRANGEBYSCORE mystus <span class="token number">30</span> <span class="token punctuation">(</span><span class="token number">40</span>
<span class="token number">1</span><span class="token punctuation">)</span> <span class="token string">&quot;zhangsan&quot;</span>
<span class="token comment"># 30&lt;&#x5206;&#x6570;&lt;60</span>
localhost:637<span class="token operator"><span class="token file-descriptor important">9</span>&gt;</span> ZRANGEBYSCORE mystus <span class="token punctuation">(</span><span class="token number">30</span> <span class="token punctuation">(</span><span class="token number">60</span>
<span class="token number">1</span><span class="token punctuation">)</span> <span class="token string">&quot;wanger&quot;</span>
<span class="token comment"># &#x5206;&#x6570;&lt;60</span>
localhost:637<span class="token operator"><span class="token file-descriptor important">9</span>&gt;</span> ZRANGEBYSCORE mystus -inf <span class="token punctuation">(</span><span class="token number">60</span>
<span class="token number">1</span><span class="token punctuation">)</span> <span class="token string">&quot;zhangsan&quot;</span>
<span class="token number">2</span><span class="token punctuation">)</span> <span class="token string">&quot;wanger&quot;</span>
<span class="token comment"># &#x5206;&#x6570;&lt;60&#x7684;&#x5143;&#x7D20;&#x4E2D;,&#x53EA;&#x8FD4;&#x56DE;&#x7D22;&#x5F15;&#x4ECE;0&#x5F00;&#x59CB;&#xFF0C;&#x8FD4;&#x56DE;&#x6570;&#x91CF;1&#x4E2A;&#x3002;</span>
localhost:637<span class="token operator"><span class="token file-descriptor important">9</span>&gt;</span> ZRANGEBYSCORE mystus -inf <span class="token punctuation">(</span><span class="token number">60</span> limit <span class="token number">0</span> <span class="token number">1</span>
<span class="token number">1</span><span class="token punctuation">)</span> <span class="token string">&quot;zhangsan&quot;</span>
<span class="token comment"># &#x67E5;&#x8BE2;&#x5206;&#x6570;=30&#x7684;&#x5143;&#x7D20;&#xFF0C;&#x53EF;&#x80FD;&#x662F;&#x591A;&#x4E2A;&#x3002;</span>
localhost:637<span class="token operator"><span class="token file-descriptor important">9</span>&gt;</span> ZRANGEBYSCORE mystus <span class="token number">30</span> <span class="token number">30</span>
<span class="token number">1</span><span class="token punctuation">)</span> <span class="token string">&quot;zhangsan&quot;</span>
</code></pre>
<h4 id="224&#x3001;&#x6839;&#x636E;&#x5206;&#x6570;&#x67E5;&#x8BE2;&#x5143;&#x7D20;&#x3002;"><a name="224&#x3001;&#x6839;&#x636E;&#x5206;&#x6570;&#x67E5;&#x8BE2;&#x5143;&#x7D20;&#x3002;" class="anchor-navigation-ex-anchor" href="#224&#x3001;&#x6839;&#x636E;&#x5206;&#x6570;&#x67E5;&#x8BE2;&#x5143;&#x7D20;&#x3002;"><i class="fa fa-link" aria-hidden="true"></i></a>2.2.4&#x3001;&#x6839;&#x636E;&#x5206;&#x6570;&#x67E5;&#x8BE2;&#x5143;&#x7D20;&#x3002;</h4>
<pre class="language-"><code class="lang-bash"><span class="token comment"># &#x67E5;&#x8BE2;&#x5206;&#x6570;=30&#x7684;&#x5143;&#x7D20;&#xFF0C;&#x53EF;&#x80FD;&#x662F;&#x591A;&#x4E2A;&#x3002;</span>
localhost:637<span class="token operator"><span class="token file-descriptor important">9</span>&gt;</span> ZRANGEBYSCORE mystus <span class="token number">30</span> <span class="token number">30</span>
<span class="token number">1</span><span class="token punctuation">)</span> <span class="token string">&quot;zhangsan&quot;</span>
</code></pre>
<h4 id="225&#x3001;&#x6839;&#x636E;&#x5143;&#x7D20;&#x67E5;&#x8BE2;&#x5206;&#x6570;&#x3002;"><a name="225&#x3001;&#x6839;&#x636E;&#x5143;&#x7D20;&#x67E5;&#x8BE2;&#x5206;&#x6570;&#x3002;" class="anchor-navigation-ex-anchor" href="#225&#x3001;&#x6839;&#x636E;&#x5143;&#x7D20;&#x67E5;&#x8BE2;&#x5206;&#x6570;&#x3002;"><i class="fa fa-link" aria-hidden="true"></i></a>2.2.5&#x3001;&#x6839;&#x636E;&#x5143;&#x7D20;&#x67E5;&#x8BE2;&#x5206;&#x6570;&#x3002;</h4>
<p>&#x547D;&#x4EE4;&#xFF1A;<code>ZSCORE key member</code></p>
<blockquote>
<p>&#x8FD4;&#x56DE;&#x6709;&#x5E8F;&#x96C6;key&#x4E2D;&#xFF0C;&#x6210;&#x5458;member&#x7684;score&#x503C;&#x3002;&#x5982;&#x679C;member&#x5143;&#x7D20;&#x4E0D;&#x662F;&#x6709;&#x5E8F;&#x96C6;key&#x7684;&#x6210;&#x5458;&#xFF0C;&#x6216;key&#x4E0D;&#x5B58;&#x5728;&#xFF0C;&#x8FD4;&#x56DE;nil&#x3002;</p>
</blockquote>
<pre class="language-"><code class="lang-bash"><span class="token comment"># &#x67E5;&#x8BE2;&#x6709;&#x5E8F;&#x96C6;&#x5408; mystus &#x4E2D;&#xFF0C;&#x5143;&#x7D20;zhangsan&#x7684;&#x5206;&#x6570;</span>
localhost:637<span class="token operator"><span class="token file-descriptor important">9</span>&gt;</span> ZSCORE mystus zhangsan
<span class="token string">&quot;30&quot;</span>
</code></pre>
<h3 id="23&#x3001;&#x4FEE;&#x6539;&#x3002;"><a name="23&#x3001;&#x4FEE;&#x6539;&#x3002;" class="anchor-navigation-ex-anchor" href="#23&#x3001;&#x4FEE;&#x6539;&#x3002;"><i class="fa fa-link" aria-hidden="true"></i></a>1.2.3. 2.3&#x3001;&#x4FEE;&#x6539;&#x3002;</h3>
<h4 id="231&#x3001;&#x4FEE;&#x6539;&#x5206;&#x6570;&#x3002;"><a name="231&#x3001;&#x4FEE;&#x6539;&#x5206;&#x6570;&#x3002;" class="anchor-navigation-ex-anchor" href="#231&#x3001;&#x4FEE;&#x6539;&#x5206;&#x6570;&#x3002;"><i class="fa fa-link" aria-hidden="true"></i></a>2.3.1&#x3001;&#x4FEE;&#x6539;&#x5206;&#x6570;&#x3002;</h4>
<p>&#x6839;&#x636E;&#x6709;&#x5E8F;&#x96C6;&#x5408;&#x7684;&#x6210;&#x5458;&#xFF0C;&#x4FEE;&#x6539;&#x5176;&#x5206;&#x6570;&#x3002;&#x547D;&#x4EE4;&#xFF1A;<code>ZINCRBY key increment member</code></p>
<blockquote>
<p>&#x4E3A;&#x6709;&#x5E8F;&#x96C6;key&#x7684;&#x6210;&#x5458;member&#x7684;score&#x503C;&#x52A0;&#x4E0A;&#x589E;&#x91CF;increment&#x3002;&#x5982;&#x679C;key&#x4E2D;&#x4E0D;&#x5B58;&#x5728;member&#xFF0C;&#x5C31;&#x5728;key&#x4E2D;&#x6DFB;&#x52A0;&#x4E00;&#x4E2A;member&#xFF0C;score&#x662F;increment&#x3002;&#x5982;&#x679C;key&#x4E0D;&#x5B58;&#x5728;&#xFF0C;&#x5C31;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x53EA;&#x542B;&#x6709;&#x6307;&#x5B9A;member&#x6210;&#x5458;&#x7684;&#x6709;&#x5E8F;&#x96C6;&#x5408;&#x3002;</p>
<p>&#x5F53;key&#x4E0D;&#x662F;&#x6709;&#x5E8F;&#x96C6;&#x7C7B;&#x578B;&#x65F6;&#xFF0C;&#x8FD4;&#x56DE;&#x4E00;&#x4E2A;&#x9519;&#x8BEF;&#x3002;</p>
<p>score&#x503C;&#x5FC5;&#x987B;&#x662F;&#x5B57;&#x7B26;&#x4E32;&#x8868;&#x793A;&#x7684;&#x6574;&#x6570;&#x503C;&#x6216;&#x53CC;&#x7CBE;&#x5EA6;&#x6D6E;&#x70B9;&#x6570;&#xFF0C;&#x5E76;&#x4E14;&#x80FD;&#x63A5;&#x53D7;double&#x7CBE;&#x5EA6;&#x7684;&#x6D6E;&#x70B9;&#x6570;&#x3002;<strong>&#x4E5F;&#x6709;&#x53EF;&#x80FD;&#x7ED9;&#x4E00;&#x4E2A;&#x8D1F;&#x6570;&#x6765;&#x51CF;&#x5C11;score&#x7684;&#x503C;</strong>&#x3002;</p>
<p>&#x8FD4;&#x56DE;&#x503C;&#xFF1A;member&#x6210;&#x5458;&#x7684;&#x65B0;score&#x503C;&#xFF0C;&#x4EE5;&#x5B57;&#x7B26;&#x4E32;&#x5F62;&#x5F0F;&#x8868;&#x793A;&#x3002;</p>
</blockquote>
<pre class="language-"><code class="lang-bash">localhost:637<span class="token operator"><span class="token file-descriptor important">9</span>&gt;</span> ZRANGE mystus <span class="token number">0</span> -1 withscores
<span class="token number">1</span><span class="token punctuation">)</span> <span class="token string">&quot;zhangsan&quot;</span>
<span class="token number">2</span><span class="token punctuation">)</span> <span class="token string">&quot;30&quot;</span>
<span class="token number">3</span><span class="token punctuation">)</span> <span class="token string">&quot;wanger&quot;</span>
<span class="token number">4</span><span class="token punctuation">)</span> <span class="token string">&quot;40&quot;</span>
<span class="token number">5</span><span class="token punctuation">)</span> <span class="token string">&quot;lisi&quot;</span>
<span class="token number">6</span><span class="token punctuation">)</span> <span class="token string">&quot;60&quot;</span>
<span class="token comment"># &#x7ED9; zhangsan &#x52A0;61&#x5206;</span>
localhost:637<span class="token operator"><span class="token file-descriptor important">9</span>&gt;</span> ZINCRBY mystus <span class="token number">61</span> zhangsan
<span class="token string">&quot;91&quot;</span>
localhost:637<span class="token operator"><span class="token file-descriptor important">9</span>&gt;</span> ZRANGE mystus <span class="token number">0</span> -1 withscores
<span class="token number">1</span><span class="token punctuation">)</span> <span class="token string">&quot;wanger&quot;</span>
<span class="token number">2</span><span class="token punctuation">)</span> <span class="token string">&quot;40&quot;</span>
<span class="token number">3</span><span class="token punctuation">)</span> <span class="token string">&quot;lisi&quot;</span>
<span class="token number">4</span><span class="token punctuation">)</span> <span class="token string">&quot;60&quot;</span>
<span class="token number">5</span><span class="token punctuation">)</span> <span class="token string">&quot;zhangsan&quot;</span>
<span class="token number">6</span><span class="token punctuation">)</span> <span class="token string">&quot;91&quot;</span>
<span class="token comment"># &#x7ED9; zhangsan &#x51CF;2&#x5206;</span>
localhost:637<span class="token operator"><span class="token file-descriptor important">9</span>&gt;</span> ZINCRBY mystus -2 zhangsan
<span class="token string">&quot;89&quot;</span>
localhost:637<span class="token operator"><span class="token file-descriptor important">9</span>&gt;</span> ZRANGE mystus <span class="token number">0</span> -1 withscores
<span class="token number">1</span><span class="token punctuation">)</span> <span class="token string">&quot;wanger&quot;</span>
<span class="token number">2</span><span class="token punctuation">)</span> <span class="token string">&quot;40&quot;</span>
<span class="token number">3</span><span class="token punctuation">)</span> <span class="token string">&quot;lisi&quot;</span>
<span class="token number">4</span><span class="token punctuation">)</span> <span class="token string">&quot;60&quot;</span>
<span class="token number">5</span><span class="token punctuation">)</span> <span class="token string">&quot;zhangsan&quot;</span>
<span class="token number">6</span><span class="token punctuation">)</span> <span class="token string">&quot;89&quot;</span>
<span class="token comment"># &#x7ED9;&#x4E0D;&#x5B58;&#x5728;&#x7684;&#x5143;&#x7D20; tom &#x51CF;2&#x5206;</span>
localhost:637<span class="token operator"><span class="token file-descriptor important">9</span>&gt;</span> ZINCRBY mystus -2 tom
<span class="token string">&quot;-2&quot;</span>
localhost:637<span class="token operator"><span class="token file-descriptor important">9</span>&gt;</span> ZRANGE mystus <span class="token number">0</span> -1 withscores
<span class="token number">1</span><span class="token punctuation">)</span> <span class="token string">&quot;tom&quot;</span>
<span class="token number">2</span><span class="token punctuation">)</span> <span class="token string">&quot;-2&quot;</span>
<span class="token number">3</span><span class="token punctuation">)</span> <span class="token string">&quot;wanger&quot;</span>
<span class="token number">4</span><span class="token punctuation">)</span> <span class="token string">&quot;40&quot;</span>
<span class="token number">5</span><span class="token punctuation">)</span> <span class="token string">&quot;lisi&quot;</span>
<span class="token number">6</span><span class="token punctuation">)</span> <span class="token string">&quot;60&quot;</span>
<span class="token number">7</span><span class="token punctuation">)</span> <span class="token string">&quot;zhangsan&quot;</span>
<span class="token number">8</span><span class="token punctuation">)</span> <span class="token string">&quot;89&quot;</span>
</code></pre>
<h4 id="232&#x3001;&#x4FEE;&#x6539;&#x5143;&#x7D20;&#x3002;"><a name="232&#x3001;&#x4FEE;&#x6539;&#x5143;&#x7D20;&#x3002;" class="anchor-navigation-ex-anchor" href="#232&#x3001;&#x4FEE;&#x6539;&#x5143;&#x7D20;&#x3002;"><i class="fa fa-link" aria-hidden="true"></i></a>2.3.2&#x3001;&#x4FEE;&#x6539;&#x5143;&#x7D20;&#x3002;</h4>
<p>&#x6839;&#x636E;&#x5206;&#x6570;&#x6709;&#x53EF;&#x80FD;&#x67E5;&#x8BE2;&#x51FA;&#x5F88;&#x591A;&#x5143;&#x7D20;&#xFF0C;&#x6240;&#x4EE5;&#x4E0D;&#x80FD;&#x6839;&#x636E;&#x5206;&#x6570;&#x4FEE;&#x6539;&#x5143;&#x7D20;&#x3002;</p>
<h3 id="24&#x3001;&#x5220;&#x9664;&#x3002;"><a name="24&#x3001;&#x5220;&#x9664;&#x3002;" class="anchor-navigation-ex-anchor" href="#24&#x3001;&#x5220;&#x9664;&#x3002;"><i class="fa fa-link" aria-hidden="true"></i></a>1.2.4. 2.4&#x3001;&#x5220;&#x9664;&#x3002;</h3>
<p>&#x5220;&#x9664;&#x53EF;&#x4EE5;&#x53C2;&#x8003;&#x4E0B;&#x9762;&#x7684;&#x6587;&#x6863;&#xFF1A;</p>
<blockquote>
<ul>
<li><a href="http://www.redis.cn/commands/zrem.html" target="_blank">ZREM</a></li>
<li><a href="http://www.redis.cn/commands/zremrangebylex.html" target="_blank">ZREMRANGEBYLEX</a></li>
<li><a href="http://www.redis.cn/commands/zremrangebyrank.html" target="_blank">ZREMRANGEBYRANK</a></li>
<li><a href="http://www.redis.cn/commands/zremrangebyscore.html" target="_blank">ZREMRANGEBYSCORE</a></li>
<li><a href="http://www.redis.cn/commands/zpopmax.html" target="_blank">ZPOPMAX</a></li>
<li><a href="http://www.redis.cn/commands/zpopmin.html" target="_blank">ZPOPMIN</a></li>
</ul>
</blockquote>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="8、redis集群搭建.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page: 8、redis集群搭建">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"9、zset类型的操作","level":"1.6.11","depth":2,"next":{"title":"数据结构和算法","level":"1.7","depth":1,"ref":"","articles":[{"title":"1、稀疏数组","level":"1.7.1","depth":2,"path":"数据结构和算法/1、稀疏数组.md","ref":"数据结构和算法/1、稀疏数组.md","articles":[]},{"title":"2、队列","level":"1.7.2","depth":2,"path":"数据结构和算法/2、队列.md","ref":"数据结构和算法/2、队列.md","articles":[]},{"title":"3、单向链表","level":"1.7.3","depth":2,"path":"数据结构和算法/3、单向链表.md","ref":"数据结构和算法/3、单向链表.md","articles":[]},{"title":"4、双向链表","level":"1.7.4","depth":2,"path":"数据结构和算法/4、双向链表.md","ref":"数据结构和算法/4、双向链表.md","articles":[]},{"title":"5、单向环形链表","level":"1.7.5","depth":2,"path":"数据结构和算法/5、单向环形链表.md","ref":"数据结构和算法/5、单向环形链表.md","articles":[]},{"title":"6、约瑟夫问题","level":"1.7.6","depth":2,"path":"数据结构和算法/6、约瑟夫问题.md","ref":"数据结构和算法/6、约瑟夫问题.md","articles":[]},{"title":"7、选择排序","level":"1.7.7","depth":2,"path":"数据结构和算法/7、选择排序.md","ref":"数据结构和算法/7、选择排序.md","articles":[]},{"title":"8、插入排序","level":"1.7.8","depth":2,"path":"数据结构和算法/8、插入排序.md","ref":"数据结构和算法/8、插入排序.md","articles":[]},{"title":"9、快速排序法","level":"1.7.9","depth":2,"path":"数据结构和算法/9、快速排序法.md","ref":"数据结构和算法/9、快速排序法.md","articles":[]}]},"previous":{"title":"8、redis集群搭建","level":"1.6.10","depth":2,"path":"redis/8、redis集群搭建.md","ref":"redis/8、redis集群搭建.md","articles":[]},"dir":"ltr"},"config":{"plugins":["donate","copy-code-button","expandable-chapters","prism","prism-themes","-highlight","anchor-navigation-ex","-sharing","sharing-plus"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"css":["prism-themes/themes/prism-duotone-dark.css"]},"search":{},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"donate":{"alipay":"/gitbook的使用/Donate/alipay.jpg","alipayText":"支付宝打赏","button":"捐赠","title":"如果您觉得有用，请我喝杯水。","wechat":"/gitbook的使用/Donate/wechat.png","wechatText":"微信打赏"},"fontsettings":{"theme":"white","family":"sans","size":2},"anchor-navigation-ex":{"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showGoTop":true,"showLevel":true},"prism-themes":{},"copy-code-button":{},"sharing":{"qq":true,"all":["weibo","douban","google","line","hatenaBookmark","instapaper","viber","vk","whatsapp","stumbleupon","messenger"],"douban":false,"facebook":true,"weibo":true,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":true,"linkedin":true},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"theme":"default","author":"wk","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"王坤个人博客","language":"zh-hans","links":{"sidebar":{"我的博客地址":"https://my.oschina.net/kunBlog"}},"gitbook":"3.2.3","description":"王坤个人博客"},"file":{"path":"redis/9、zset类型的操作.md","mtime":"2020-03-27T09:55:52.517Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-04-01T11:40:27.319Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-donate/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-copy-code-button/toggle.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

